import { PrimaryGeneratedColumn, Column, Entity } from "typeorm";
import { IsNotEmpty } from 'class-validator';

@Entity()
export class Article {
  @PrimaryGeneratedColumn()
  @IsNotEmpty()
  id: number;

  @Column()
  @IsNotEmpty()
  userId: string;

  @Column()
  title: string;

  @Column()
  datetime: string;

  @Column()
  content: string;

}